﻿using Core.Manager;
using Ninject;
using Ninject.Modules;

namespace Core.DependencyInjection
{
    public class NinjectFactory
    {
        public static IKernel Kernel { get; private set; }

        public static void Wire(INinjectModule module)
        {
            Kernel = new StandardKernel(module);
        }

        public static T Resolve<T>()
        {
            return Kernel.Get<T>();
        }
    }

    public class ApplicationModule : NinjectModule
    {
        public override void Load()
        {
            Bind<IManager>().To<Manager.Manager>();
        }
    }
}